#include <REGX52.H>
#include <INTRINS.H>
#include "NRF24L01.h"
#include "SPI.h"
#include "delay.h"
#include "lcd1602.h"
void main()
{
	 SPI_Init();
	 Delay1ms(200);
	 LCD_Init();
	 LCD_ShowString(1,1,"TEST");
	 while(NRF24L01_Check());
	 LCD_ShowString(2,1,"OK");
   NRF24L01_Init();
	 NRF24L01_TX_Mode();
	 nrf24l01_buf[0] = 4;
	 nrf24l01_buf[1] = 0x88;
	 nrf24l01_buf[2] = 0x99;
	 nrf24l01_buf[3] = 0xAA;
	 nrf24l01_buf[4] = 0xBB;
   while(1)
  {
		Delay1ms(1000);
		NRF24L01_TxPacket(nrf24l01_buf);
   }
}